<?php $files = Mage::registry('workbench_design'); ?>

<div id="design-selector">
	
	<div class="toggler left<?php echo (Mage::getModel('core/cookie')->get('toggler')) ? ' enabled' : '' ?>" title="<?php echo $this->__('Enable/ Disable image'); ?>"></div>
	
	<select id="design-files" class="right" title="<?php echo $this->__('Add new design files in media/design folder'); ?>">
		<?php foreach($files as $key => $value): ?>
			<option value="<?php echo $this->helper('workbench')->getDesignUrl($value['file-name']); ?>" <?php echo (Mage::getModel('core/cookie')->get('designimage') == $this->helper('workbench')->getDesignUrl($value['file-name'])) ? 'selected="selected"' : '' ?>><?php echo $value['title']; ?></option>
		<?php endforeach; ?>
	</select>

</div>

<div id="wb-slider">
	<div class="icon left" title="<?php echo $this->__('Opacity'); ?>"></div>
	<div class="controls right">
		<div id="opacity-slider" title="<?php echo $this->__('Slide to change opacity'); ?>"></div>
	</div>
	<div class="clear"></div>
</div>

<div id="constrain">
	<div class="icon left" title="<?php echo $this->__('Positioning'); ?>"></div>
	<div class="controls right">
		<input type="text" id="x-axis" value="<?php echo (Mage::getModel('core/cookie')->get('x-axis')) ? Mage::getModel('core/cookie')->get('x-axis') : 0 ?>" title="<?php echo $this->__('X axis'); ?>"/><span class="axis x-axis<?php echo (Mage::getModel('core/cookie')->get('constrainxlock')) ? ' locked' : '' ?>" title="<?php echo $this->__('Constrains dragging to x axis'); ?>">&nbsp;</span>
		<input type="text" id="y-axis" value="<?php echo (Mage::getModel('core/cookie')->get('y-axis')) ? Mage::getModel('core/cookie')->get('y-axis') : 0 ?>" title="<?php echo $this->__('Y axis'); ?>"/><span class="axis y-axis<?php echo (Mage::getModel('core/cookie')->get('constrainylock')) ? ' locked' : '' ?>" title="<?php echo $this->__('Constrains dragging to y axis'); ?>">&nbsp;</span>
	</div>
</div>

<div id="snap-to-grid">
	<div class="icon left<?php echo (Mage::getModel('core/cookie')->get('snap')) ? ' enabled' : '' ?>" title="<?php echo $this->__('Snap to grid'); ?>"></div>
	<div class="controls left">
		<input type="text" value="<?php echo (Mage::getModel('core/cookie')->get('snapx')) ? Mage::getModel('core/cookie')->get('snapx') : 10 ?>" id="x-value" title="<?php echo $this->__('Snap to x axis. Max. size is equal to window width'); ?>"/><span>x</span><input type="text" value="<?php echo (Mage::getModel('core/cookie')->get('snapy')) ? Mage::getModel('core/cookie')->get('snapy') : 10 ?>" id="y-value" title="<?php echo $this->__('Snap to y axis. Max. size is equal to window height'); ?>"/>
	</div>
</div>

<div id="helper">
	<div class="icon left<?php echo (Mage::getModel('core/cookie')->get('helper') == 1) ? ' enabled' : '' ?>" title="<?php echo $this->__('Helper'); ?>"></div>
	<div class="icon-drop left<?php echo (Mage::getModel('core/cookie')->get('helper') == 1) ? ' visible' : '' ?><?php echo (Mage::getModel('core/cookie')->get('helperdrop') == 1) ? ' enabled' : '' ?>" title="<?php echo $this->__('Enable to be droppable'); ?>"></div>
	<div class="file right">
		<form class="cmxform" id="fileform" method="POST" action="<?php echo $this->getUrl('workbench/main/fileUpload'); ?>" enctype="multipart/form-data" novalidate="novalidate">
			<div class="browse-file-input"><input type="file" id="file" name="file" class="{validate:{required:true,accept:'gif?|jpg|png|bmp'}}" /></div>
			<input class="submit" type="submit" value="Upload" id="submit-image" title="<?php echo $this->__('Upload design files via AJAX'); ?>"/>
			<div class="file-error">
				<?php echo $this->__('Wrong upload file or format!'); ?>
			</div>
			<div class="custom-button browse" title="<?php echo $this->__('Browse for file. (gif, jpg, png)');?>"><?php echo $this->__('Browse...');?></div>			
			<div class="custom-button upload" title="<?php echo $this->__('Upload selected file');?>"><?php echo $this->__('Upload');?></div>	
		</form>
		<div class="clear"></div>
	</div>
</div>